@extends("Admin.AdminPublic.publics")
@section("main")
<div class="container">
                                                            
                    
 
 
  <div class="mws-panel grid_8"> 
   <div class="mws-panel-header"> 
    <span>商品添加</span> 
   </div> 
   <div class="mws-panel-body no-padding"> 
    <form class="mws-form" action="/admingoods/{{$goods->id}}" method="post" enctype="multipart/form-data">
      {{csrf_field()}}
      @if (count($errors) > 0)
       <div class="mws-form-message error">
          <div class="alert alert-danger">
              <ul>
                  @foreach ($errors->all() as $error)
                      <li>{{ $error }}</li>
                  @endforeach
                  
              </ul>
          </div>
       </div>
     @endif
      <div class="mws-form-inline"> 
      <div class="mws-form-row"> 
       <label class="mws-form-label">商品名</label> 
       <div class="mws-form-item"> 
        <input type="text" name="name" class="large" value="{{$goods->name}}" autofocus=""> 
       </div> 
      </div> 
      <div class="mws-form-row">
     <label class="mws-form-label">分类</label>
      <div class="mws-form-item">
       <select class="large" name="cate_id">
        <option value="0">--请选择--</option>

            @foreach($cate as $value)
              <option value="{{$value->pid}}">{{$value->name}}</option>
            @endforeach
        </select>
      </div>
      </div>
      <div class="mws-form-row"> 
       <label class="mws-form-label">图片</label> 
       <div class="mws-form-item"> 
        <input type="file" name="pic" class="large"> 
       </div> 
      </div> 
      <div class="mws-form-row"> 
       <label class="mws-form-label">商品描述</label> 
       <div class="mws-form-item"> 
        <input type="text" name="descr" class="large" value="{{$goods->descr}}"> 
       </div> 
      </div> 
      <div class="mws-form-row"> 
       <label class="mws-form-label">库存</label> 
       <div class="mws-form-item"> 
        <input type="text" name="num" class="large" value="{{$goods->num}}"> 
       </div> 
      </div> 
      <div class="mws-form-row"> 
       <label class="mws-form-label">颜色</label> 
       <div class="mws-form-item"> 
        <input type="text" name="color" class="large" value="{{$goods->color}}"> 
       </div> 
      </div> 
      <div class="mws-form-row"> 
       <label class="mws-form-label">尺寸</label> 
       <div class="mws-form-item"> 
        <input type="text" name="size" class="large" value="{{$goods->size}}"> 
       </div> 
      </div> 
      <div class="mws-form-row"> 
       <label class="mws-form-label">价格</label> 
       <div class="mws-form-item">
        <input type="text" name="price" class="large" value="{{$goods->price}}"> 
       </div> 
      </div> 
         
  </div>  
     <div class="mws-button-row"> 
      
      {{method_field('PUT')}}
      <!-- <input type="hidden" name="_token" value="2PaMbtrTaI3UWfGffGjq6Z5ugrcIpis0lHCPIuDK"> --><!-- 这个隐藏域有毒， -->
      <input type="submit" value="Submit" class="btn btn-danger"> 
      <input type="reset" value="Reset" class="btn "> 
     </div> 
    </form> 
   </div> 
  </div>
 

                    

                               
                    <!-- Panels End -->
                </div>
@endsection
@section("title","分类首页")